/*
 * @Description: 
 * @FilePath: \rs_wms_pc\src\api\basic\codeRule.js
 */
import request from '@/utils/request'

// 查询条码规则列表
export function list(query) {
  return request({
    url: '/system/rule/list',
    method: 'get',
    params: query
  })
}

// 查询条码规则详细
export function getDetail(id) {
  return request({
    url: '/system/rule/getWithDetail/' + id,
    method: 'get'
  })
}
// 新增条码规则
export function add(data) {
  return request({
    url: '/system/rule/addAndUpdateDetail',
    method: 'post',
    data: data
  })
}

// 修改条码规则
export function update(data) {
  return request({
    url: '/system/rule',
    method: 'put',
    data: data
  })
}

// 删除条码规则
export function del(id) {
  return request({
    url: '/system/rule/' + id,
    method: 'delete'
  })
}
